package cn.ibizlab.odoo.core.odoo_product.service.impl;

import java.io.Serializable;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import java.math.BigInteger;
import java.util.Collection;

import lombok.extern.slf4j.Slf4j;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cglib.beans.BeanCopier;
import org.springframework.stereotype.Service;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.Pageable;
import cn.ibizlab.odoo.core.client.model.Iproduct_product;
import cn.ibizlab.odoo.core.odoo_product.domain.Product_product;
import cn.ibizlab.odoo.core.odoo_product.filter.Product_productSearchContext;
import cn.ibizlab.odoo.core.odoo_product.service.IProduct_productService;
import cn.ibizlab.odoo.util.SearchResult;
import cn.ibizlab.odoo.util.log.IBIZLog;

/**
 * 实体[产品] 服务对象接口实现
 */
@Slf4j
@IBIZLog
@Service
public class Product_productServiceImpl implements IProduct_productService {

    @Autowired
    private cn.ibizlab.odoo.core.client.service.Iproduct_productClientService product_productClientService;

    @Override
    public void updateBatch(List<Product_product> product_products, int batchSize) {

        //product_productClientService.updateBatch(product_products,batchSize) ;

    }

    @Override
    public Product_product get(Integer id) {
        Iproduct_product clientModel = product_productClientService.createModel();
        clientModel.setId(id);
        product_productClientService.get(clientModel) ;
        return this.convert2Domain(clientModel,null);
    }

    @Override
    public Product_product get(Product_product product_product) {
        Product_product retproduct_product = this.get(product_product.getId()) ;
    	BeanCopier copier=BeanCopier.create(retproduct_product.getClass(), product_product.getClass(), false);
        copier.copy(retproduct_product, product_product, null);
        return product_product ;
    }

    @Override
    public boolean create(Product_product product_product) {
        boolean bOk = false ;
        Iproduct_product clientModel = this.convert2Model(product_product,null);
        product_productClientService.create(clientModel) ;
        this.convert2Domain(clientModel,product_product);
        bOk = true ;

        return bOk ;
    }

    @Override
    public boolean update(Product_product product_product) {
        boolean bOk = false ;
        Iproduct_product clientModel = this.convert2Model(product_product,null);
        product_productClientService.update(clientModel) ;
        this.convert2Domain(clientModel,product_product) ;
        bOk = true;
        return bOk ;
    }

    @Override
    public void removeBatch(Collection<? extends Serializable> idList, int batchSize) {

        //product_productClientService.removeBatch(product_products) ;

    }

    @Override
    public boolean remove(Integer id) {
        boolean bOk = false ;
        Iproduct_product clientModel = product_productClientService.createModel();
        clientModel.setId(id);
        product_productClientService.remove(clientModel) ;
        bOk = true ;
        return bOk ;
    }

    @Override
    public void createBatch(List<Product_product> product_products, int batchSize) {

                        //product_productClientService.createBatch(product_products,batchSize) ;

    }

    /**
     * 查询集合 默认查询
     */
    @Override
    public Page<Product_product> searchDefault(Product_productSearchContext context) {
        List<Product_product> list = new ArrayList<Product_product>();
        Page<cn.ibizlab.odoo.core.client.model.Iproduct_product> clientModelList = product_productClientService.search(context) ;
        for(cn.ibizlab.odoo.core.client.model.Iproduct_product clientModel : clientModelList){
            list.add( this.convert2Domain(clientModel,null));
        }
        return new PageImpl<Product_product>(list, context.getPageable(), clientModelList.getTotalElements());
    }


    /**
     * 根据产品模板查询
     */
    @Override
    public Page<Product_product> selectByOdoo_product_tmpl(Integer id){
        Product_productSearchContext context = new Product_productSearchContext();
        if(!org.springframework.util.StringUtils.isEmpty(id)){
            cn.ibizlab.odoo.util.SearchFieldFilter fieldFilter=new cn.ibizlab.odoo.util.SearchFieldFilter();
            fieldFilter.setParam("id");
            fieldFilter.setCondition(cn.ibizlab.odoo.util.enums.SearchFieldType.EQ);
            fieldFilter.setValue(id);
            context.getCondition().add(fieldFilter);
        }
        List<Product_product> list = new ArrayList<Product_product>();
        Page<cn.ibizlab.odoo.core.client.model.Iproduct_product> clientModelList = product_productClientService.search(context) ;
        for(cn.ibizlab.odoo.core.client.model.Iproduct_product clientModel : clientModelList){
            list.add( this.convert2Domain(clientModel,null));
        }
        return new PageImpl<Product_product>(list, context.getPageable(), clientModelList.getTotalElements());

    }

    /**
     * 根据用户查询
     */
    @Override
    public Page<Product_product> selectByOdoo_create(Integer id){
        Product_productSearchContext context = new Product_productSearchContext();
        if(!org.springframework.util.StringUtils.isEmpty(id)){
            cn.ibizlab.odoo.util.SearchFieldFilter fieldFilter=new cn.ibizlab.odoo.util.SearchFieldFilter();
            fieldFilter.setParam("id");
            fieldFilter.setCondition(cn.ibizlab.odoo.util.enums.SearchFieldType.EQ);
            fieldFilter.setValue(id);
            context.getCondition().add(fieldFilter);
        }
        List<Product_product> list = new ArrayList<Product_product>();
        Page<cn.ibizlab.odoo.core.client.model.Iproduct_product> clientModelList = product_productClientService.search(context) ;
        for(cn.ibizlab.odoo.core.client.model.Iproduct_product clientModel : clientModelList){
            list.add( this.convert2Domain(clientModel,null));
        }
        return new PageImpl<Product_product>(list, context.getPageable(), clientModelList.getTotalElements());

    }

    /**
     * 根据用户查询
     */
    @Override
    public Page<Product_product> selectByOdoo_write(Integer id){
        Product_productSearchContext context = new Product_productSearchContext();
        if(!org.springframework.util.StringUtils.isEmpty(id)){
            cn.ibizlab.odoo.util.SearchFieldFilter fieldFilter=new cn.ibizlab.odoo.util.SearchFieldFilter();
            fieldFilter.setParam("id");
            fieldFilter.setCondition(cn.ibizlab.odoo.util.enums.SearchFieldType.EQ);
            fieldFilter.setValue(id);
            context.getCondition().add(fieldFilter);
        }
        List<Product_product> list = new ArrayList<Product_product>();
        Page<cn.ibizlab.odoo.core.client.model.Iproduct_product> clientModelList = product_productClientService.search(context) ;
        for(cn.ibizlab.odoo.core.client.model.Iproduct_product clientModel : clientModelList){
            list.add( this.convert2Domain(clientModel,null));
        }
        return new PageImpl<Product_product>(list, context.getPageable(), clientModelList.getTotalElements());

    }



    public Iproduct_product convert2Model(Product_product domain , Iproduct_product model) {
        if(domain == null)
            return model ;
        if(model==null){
            model = product_productClientService.createModel() ;
        }

         if(domain.getVariant_seller_idsDirtyFlag())
            model.setVariant_seller_ids(domain.getVariant_seller_ids());
         if(domain.getProduct_template_attribute_value_idsDirtyFlag())
            model.setProduct_template_attribute_value_ids(domain.getProduct_template_attribute_value_ids());
         if(domain.getProduct_variant_idsDirtyFlag())
            model.setProduct_variant_ids(domain.getProduct_variant_ids());
         if(domain.getImage_smallDirtyFlag())
            model.setImage_small(domain.getImage_small());
         if(domain.getMessage_unreadDirtyFlag())
            model.setMessage_unread(domain.getMessage_unread());
         if(domain.getVolumeDirtyFlag())
            model.setVolume(domain.getVolume());
         if(domain.getLst_priceDirtyFlag())
            model.setLst_price(domain.getLst_price());
         if(domain.getValid_product_attribute_idsDirtyFlag())
            model.setValid_product_attribute_ids(domain.getValid_product_attribute_ids());
         if(domain.getStock_fifo_manual_move_idsDirtyFlag())
            model.setStock_fifo_manual_move_ids(domain.getStock_fifo_manual_move_ids());
         if(domain.getStock_quant_idsDirtyFlag())
            model.setStock_quant_ids(domain.getStock_quant_ids());
         if(domain.getSupplier_taxes_idDirtyFlag())
            model.setSupplier_taxes_id(domain.getSupplier_taxes_id());
         if(domain.getPricelist_item_idsDirtyFlag())
            model.setPricelist_item_ids(domain.getPricelist_item_ids());
         if(domain.get__last_updateDirtyFlag())
            model.set__last_update(domain.get__last_update());
         if(domain.getAccessory_product_idsDirtyFlag())
            model.setAccessory_product_ids(domain.getAccessory_product_ids());
         if(domain.getSeller_idsDirtyFlag())
            model.setSeller_ids(domain.getSeller_ids());
         if(domain.getValid_product_attribute_value_wnva_idsDirtyFlag())
            model.setValid_product_attribute_value_wnva_ids(domain.getValid_product_attribute_value_wnva_ids());
         if(domain.getPartner_refDirtyFlag())
            model.setPartner_ref(domain.getPartner_ref());
         if(domain.getProduct_image_idsDirtyFlag())
            model.setProduct_image_ids(domain.getProduct_image_ids());
         if(domain.getMrp_product_qtyDirtyFlag())
            model.setMrp_product_qty(domain.getMrp_product_qty());
         if(domain.getWrite_dateDirtyFlag())
            model.setWrite_date(domain.getWrite_date());
         if(domain.getValid_product_template_attribute_line_idsDirtyFlag())
            model.setValid_product_template_attribute_line_ids(domain.getValid_product_template_attribute_line_ids());
         if(domain.getActivity_type_idDirtyFlag())
            model.setActivity_type_id(domain.getActivity_type_id());
         if(domain.getPublic_categ_idsDirtyFlag())
            model.setPublic_categ_ids(domain.getPublic_categ_ids());
         if(domain.getEvent_ticket_idsDirtyFlag())
            model.setEvent_ticket_ids(domain.getEvent_ticket_ids());
         if(domain.getPriceDirtyFlag())
            model.setPrice(domain.getPrice());
         if(domain.getAttribute_line_idsDirtyFlag())
            model.setAttribute_line_ids(domain.getAttribute_line_ids());
         if(domain.getVirtual_availableDirtyFlag())
            model.setVirtual_available(domain.getVirtual_available());
         if(domain.getNbr_reordering_rulesDirtyFlag())
            model.setNbr_reordering_rules(domain.getNbr_reordering_rules());
         if(domain.getActiveDirtyFlag())
            model.setActive(domain.getActive());
         if(domain.getMessage_is_followerDirtyFlag())
            model.setMessage_is_follower(domain.getMessage_is_follower());
         if(domain.getMessage_unread_counterDirtyFlag())
            model.setMessage_unread_counter(domain.getMessage_unread_counter());
         if(domain.getIdDirtyFlag())
            model.setId(domain.getId());
         if(domain.getWebsite_price_differenceDirtyFlag())
            model.setWebsite_price_difference(domain.getWebsite_price_difference());
         if(domain.getMessage_follower_idsDirtyFlag())
            model.setMessage_follower_ids(domain.getMessage_follower_ids());
         if(domain.getCart_qtyDirtyFlag())
            model.setCart_qty(domain.getCart_qty());
         if(domain.getWebsite_public_priceDirtyFlag())
            model.setWebsite_public_price(domain.getWebsite_public_price());
         if(domain.getRating_idsDirtyFlag())
            model.setRating_ids(domain.getRating_ids());
         if(domain.getBom_line_idsDirtyFlag())
            model.setBom_line_ids(domain.getBom_line_ids());
         if(domain.getWebsite_priceDirtyFlag())
            model.setWebsite_price(domain.getWebsite_price());
         if(domain.getOutgoing_qtyDirtyFlag())
            model.setOutgoing_qty(domain.getOutgoing_qty());
         if(domain.getSales_countDirtyFlag())
            model.setSales_count(domain.getSales_count());
         if(domain.getValid_product_attribute_wnva_idsDirtyFlag())
            model.setValid_product_attribute_wnva_ids(domain.getValid_product_attribute_wnva_ids());
         if(domain.getImage_mediumDirtyFlag())
            model.setImage_medium(domain.getImage_medium());
         if(domain.getValid_existing_variant_idsDirtyFlag())
            model.setValid_existing_variant_ids(domain.getValid_existing_variant_ids());
         if(domain.getStock_value_currency_idDirtyFlag())
            model.setStock_value_currency_id(domain.getStock_value_currency_id());
         if(domain.getStock_valueDirtyFlag())
            model.setStock_value(domain.getStock_value());
         if(domain.getWebsite_style_idsDirtyFlag())
            model.setWebsite_style_ids(domain.getWebsite_style_ids());
         if(domain.getMessage_channel_idsDirtyFlag())
            model.setMessage_channel_ids(domain.getMessage_channel_ids());
         if(domain.getWeightDirtyFlag())
            model.setWeight(domain.getWeight());
         if(domain.getBom_idsDirtyFlag())
            model.setBom_ids(domain.getBom_ids());
         if(domain.getMessage_has_error_counterDirtyFlag())
            model.setMessage_has_error_counter(domain.getMessage_has_error_counter());
         if(domain.getActivity_stateDirtyFlag())
            model.setActivity_state(domain.getActivity_state());
         if(domain.getValid_product_template_attribute_line_wnva_idsDirtyFlag())
            model.setValid_product_template_attribute_line_wnva_ids(domain.getValid_product_template_attribute_line_wnva_ids());
         if(domain.getMessage_main_attachment_idDirtyFlag())
            model.setMessage_main_attachment_id(domain.getMessage_main_attachment_id());
         if(domain.getMessage_partner_idsDirtyFlag())
            model.setMessage_partner_ids(domain.getMessage_partner_ids());
         if(domain.getCreate_dateDirtyFlag())
            model.setCreate_date(domain.getCreate_date());
         if(domain.getValid_product_attribute_value_idsDirtyFlag())
            model.setValid_product_attribute_value_ids(domain.getValid_product_attribute_value_ids());
         if(domain.getQty_availableDirtyFlag())
            model.setQty_available(domain.getQty_available());
         if(domain.getMessage_attachment_countDirtyFlag())
            model.setMessage_attachment_count(domain.getMessage_attachment_count());
         if(domain.getImage_variantDirtyFlag())
            model.setImage_variant(domain.getImage_variant());
         if(domain.getStock_move_idsDirtyFlag())
            model.setStock_move_ids(domain.getStock_move_ids());
         if(domain.getMessage_needactionDirtyFlag())
            model.setMessage_needaction(domain.getMessage_needaction());
         if(domain.getWebsite_message_idsDirtyFlag())
            model.setWebsite_message_ids(domain.getWebsite_message_ids());
         if(domain.getStock_fifo_real_time_aml_idsDirtyFlag())
            model.setStock_fifo_real_time_aml_ids(domain.getStock_fifo_real_time_aml_ids());
         if(domain.getActivity_date_deadlineDirtyFlag())
            model.setActivity_date_deadline(domain.getActivity_date_deadline());
         if(domain.getCodeDirtyFlag())
            model.setCode(domain.getCode());
         if(domain.getReordering_min_qtyDirtyFlag())
            model.setReordering_min_qty(domain.getReordering_min_qty());
         if(domain.getImageDirtyFlag())
            model.setImage(domain.getImage());
         if(domain.getRoute_idsDirtyFlag())
            model.setRoute_ids(domain.getRoute_ids());
         if(domain.getTaxes_idDirtyFlag())
            model.setTaxes_id(domain.getTaxes_id());
         if(domain.getBom_countDirtyFlag())
            model.setBom_count(domain.getBom_count());
         if(domain.getMessage_needaction_counterDirtyFlag())
            model.setMessage_needaction_counter(domain.getMessage_needaction_counter());
         if(domain.getPackaging_idsDirtyFlag())
            model.setPackaging_ids(domain.getPackaging_ids());
         if(domain.getValid_archived_variant_idsDirtyFlag())
            model.setValid_archived_variant_ids(domain.getValid_archived_variant_ids());
         if(domain.getActivity_user_idDirtyFlag())
            model.setActivity_user_id(domain.getActivity_user_id());
         if(domain.getItem_idsDirtyFlag())
            model.setItem_ids(domain.getItem_ids());
         if(domain.getPurchased_product_qtyDirtyFlag())
            model.setPurchased_product_qty(domain.getPurchased_product_qty());
         if(domain.getReordering_max_qtyDirtyFlag())
            model.setReordering_max_qty(domain.getReordering_max_qty());
         if(domain.getOrderpoint_idsDirtyFlag())
            model.setOrderpoint_ids(domain.getOrderpoint_ids());
         if(domain.getOptional_product_idsDirtyFlag())
            model.setOptional_product_ids(domain.getOptional_product_ids());
         if(domain.getIs_product_variantDirtyFlag())
            model.setIs_product_variant(domain.getIs_product_variant());
         if(domain.getUsed_in_bom_countDirtyFlag())
            model.setUsed_in_bom_count(domain.getUsed_in_bom_count());
         if(domain.getQty_at_dateDirtyFlag())
            model.setQty_at_date(domain.getQty_at_date());
         if(domain.getMessage_has_errorDirtyFlag())
            model.setMessage_has_error(domain.getMessage_has_error());
         if(domain.getActivity_idsDirtyFlag())
            model.setActivity_ids(domain.getActivity_ids());
         if(domain.getMessage_idsDirtyFlag())
            model.setMessage_ids(domain.getMessage_ids());
         if(domain.getBarcodeDirtyFlag())
            model.setBarcode(domain.getBarcode());
         if(domain.getDisplay_nameDirtyFlag())
            model.setDisplay_name(domain.getDisplay_name());
         if(domain.getStandard_priceDirtyFlag())
            model.setStandard_price(domain.getStandard_price());
         if(domain.getAttribute_value_idsDirtyFlag())
            model.setAttribute_value_ids(domain.getAttribute_value_ids());
         if(domain.getPrice_extraDirtyFlag())
            model.setPrice_extra(domain.getPrice_extra());
         if(domain.getVariant_bom_idsDirtyFlag())
            model.setVariant_bom_ids(domain.getVariant_bom_ids());
         if(domain.getAlternative_product_idsDirtyFlag())
            model.setAlternative_product_ids(domain.getAlternative_product_ids());
         if(domain.getDefault_codeDirtyFlag())
            model.setDefault_code(domain.getDefault_code());
         if(domain.getRoute_from_categ_idsDirtyFlag())
            model.setRoute_from_categ_ids(domain.getRoute_from_categ_ids());
         if(domain.getActivity_summaryDirtyFlag())
            model.setActivity_summary(domain.getActivity_summary());
         if(domain.getIncoming_qtyDirtyFlag())
            model.setIncoming_qty(domain.getIncoming_qty());
         if(domain.getCurrency_idDirtyFlag())
            model.setCurrency_id(domain.getCurrency_id());
         if(domain.getTrackingDirtyFlag())
            model.setTracking(domain.getTracking());
         if(domain.getDescription_pickingDirtyFlag())
            model.setDescription_picking(domain.getDescription_picking());
         if(domain.getProperty_stock_account_outputDirtyFlag())
            model.setProperty_stock_account_output(domain.getProperty_stock_account_output());
         if(domain.getSale_okDirtyFlag())
            model.setSale_ok(domain.getSale_ok());
         if(domain.getWebsite_descriptionDirtyFlag())
            model.setWebsite_description(domain.getWebsite_description());
         if(domain.getWebsite_meta_og_imgDirtyFlag())
            model.setWebsite_meta_og_img(domain.getWebsite_meta_og_img());
         if(domain.getCompany_idDirtyFlag())
            model.setCompany_id(domain.getCompany_id());
         if(domain.getTo_weightDirtyFlag())
            model.setTo_weight(domain.getTo_weight());
         if(domain.getDescriptionDirtyFlag())
            model.setDescription(domain.getDescription());
         if(domain.getDescription_pickinginDirtyFlag())
            model.setDescription_pickingin(domain.getDescription_pickingin());
         if(domain.getList_priceDirtyFlag())
            model.setList_price(domain.getList_price());
         if(domain.getHide_expense_policyDirtyFlag())
            model.setHide_expense_policy(domain.getHide_expense_policy());
         if(domain.getDescription_saleDirtyFlag())
            model.setDescription_sale(domain.getDescription_sale());
         if(domain.getCost_methodDirtyFlag())
            model.setCost_method(domain.getCost_method());
         if(domain.getSequenceDirtyFlag())
            model.setSequence(domain.getSequence());
         if(domain.getSale_line_warn_msgDirtyFlag())
            model.setSale_line_warn_msg(domain.getSale_line_warn_msg());
         if(domain.getWarehouse_idDirtyFlag())
            model.setWarehouse_id(domain.getWarehouse_id());
         if(domain.getRentalDirtyFlag())
            model.setRental(domain.getRental());
         if(domain.getProperty_account_creditor_price_differenceDirtyFlag())
            model.setProperty_account_creditor_price_difference(domain.getProperty_account_creditor_price_difference());
         if(domain.getWeight_uom_nameDirtyFlag())
            model.setWeight_uom_name(domain.getWeight_uom_name());
         if(domain.getCost_currency_idDirtyFlag())
            model.setCost_currency_id(domain.getCost_currency_id());
         if(domain.getProperty_stock_account_inputDirtyFlag())
            model.setProperty_stock_account_input(domain.getProperty_stock_account_input());
         if(domain.getNameDirtyFlag())
            model.setName(domain.getName());
         if(domain.getProduce_delayDirtyFlag())
            model.setProduce_delay(domain.getProduce_delay());
         if(domain.getIs_seo_optimizedDirtyFlag())
            model.setIs_seo_optimized(domain.getIs_seo_optimized());
         if(domain.getWebsite_urlDirtyFlag())
            model.setWebsite_url(domain.getWebsite_url());
         if(domain.getRating_last_feedbackDirtyFlag())
            model.setRating_last_feedback(domain.getRating_last_feedback());
         if(domain.getWebsite_size_yDirtyFlag())
            model.setWebsite_size_y(domain.getWebsite_size_y());
         if(domain.getEvent_okDirtyFlag())
            model.setEvent_ok(domain.getEvent_ok());
         if(domain.getInventory_availabilityDirtyFlag())
            model.setInventory_availability(domain.getInventory_availability());
         if(domain.getPurchase_okDirtyFlag())
            model.setPurchase_ok(domain.getPurchase_ok());
         if(domain.getCreate_uid_textDirtyFlag())
            model.setCreate_uid_text(domain.getCreate_uid_text());
         if(domain.getRating_last_valueDirtyFlag())
            model.setRating_last_value(domain.getRating_last_value());
         if(domain.getWebsite_meta_titleDirtyFlag())
            model.setWebsite_meta_title(domain.getWebsite_meta_title());
         if(domain.getRating_last_imageDirtyFlag())
            model.setRating_last_image(domain.getRating_last_image());
         if(domain.getDescription_purchaseDirtyFlag())
            model.setDescription_purchase(domain.getDescription_purchase());
         if(domain.getWebsite_idDirtyFlag())
            model.setWebsite_id(domain.getWebsite_id());
         if(domain.getCan_be_expensedDirtyFlag())
            model.setCan_be_expensed(domain.getCan_be_expensed());
         if(domain.getSale_line_warnDirtyFlag())
            model.setSale_line_warn(domain.getSale_line_warn());
         if(domain.getWebsite_size_xDirtyFlag())
            model.setWebsite_size_x(domain.getWebsite_size_x());
         if(domain.getService_to_purchaseDirtyFlag())
            model.setService_to_purchase(domain.getService_to_purchase());
         if(domain.getWebsite_sequenceDirtyFlag())
            model.setWebsite_sequence(domain.getWebsite_sequence());
         if(domain.getProperty_stock_inventoryDirtyFlag())
            model.setProperty_stock_inventory(domain.getProperty_stock_inventory());
         if(domain.getLocation_idDirtyFlag())
            model.setLocation_id(domain.getLocation_id());
         if(domain.getProperty_valuationDirtyFlag())
            model.setProperty_valuation(domain.getProperty_valuation());
         if(domain.getIs_publishedDirtyFlag())
            model.setIs_published(domain.getIs_published());
         if(domain.getExpense_policyDirtyFlag())
            model.setExpense_policy(domain.getExpense_policy());
         if(domain.getWeight_uom_idDirtyFlag())
            model.setWeight_uom_id(domain.getWeight_uom_id());
         if(domain.getColorDirtyFlag())
            model.setColor(domain.getColor());
         if(domain.getProperty_stock_productionDirtyFlag())
            model.setProperty_stock_production(domain.getProperty_stock_production());
         if(domain.getWebsite_publishedDirtyFlag())
            model.setWebsite_published(domain.getWebsite_published());
         if(domain.getWebsite_meta_keywordsDirtyFlag())
            model.setWebsite_meta_keywords(domain.getWebsite_meta_keywords());
         if(domain.getDescription_pickingoutDirtyFlag())
            model.setDescription_pickingout(domain.getDescription_pickingout());
         if(domain.getPricelist_idDirtyFlag())
            model.setPricelist_id(domain.getPricelist_id());
         if(domain.getRating_countDirtyFlag())
            model.setRating_count(domain.getRating_count());
         if(domain.getWebsite_meta_descriptionDirtyFlag())
            model.setWebsite_meta_description(domain.getWebsite_meta_description());
         if(domain.getValuationDirtyFlag())
            model.setValuation(domain.getValuation());
         if(domain.getInvoice_policyDirtyFlag())
            model.setInvoice_policy(domain.getInvoice_policy());
         if(domain.getPurchase_line_warn_msgDirtyFlag())
            model.setPurchase_line_warn_msg(domain.getPurchase_line_warn_msg());
         if(domain.getWrite_uid_textDirtyFlag())
            model.setWrite_uid_text(domain.getWrite_uid_text());
         if(domain.getProperty_account_income_idDirtyFlag())
            model.setProperty_account_income_id(domain.getProperty_account_income_id());
         if(domain.getProperty_cost_methodDirtyFlag())
            model.setProperty_cost_method(domain.getProperty_cost_method());
         if(domain.getCateg_idDirtyFlag())
            model.setCateg_id(domain.getCateg_id());
         if(domain.getIsPartsDirtyFlag())
            model.setIsParts(domain.getIsParts());
         if(domain.getUom_idDirtyFlag())
            model.setUom_id(domain.getUom_id());
         if(domain.getProduct_variant_idDirtyFlag())
            model.setProduct_variant_id(domain.getProduct_variant_id());
         if(domain.getTypeDirtyFlag())
            model.setType(domain.getType());
         if(domain.getPurchase_methodDirtyFlag())
            model.setPurchase_method(domain.getPurchase_method());
         if(domain.getResponsible_idDirtyFlag())
            model.setResponsible_id(domain.getResponsible_id());
         if(domain.getService_typeDirtyFlag())
            model.setService_type(domain.getService_type());
         if(domain.getUom_nameDirtyFlag())
            model.setUom_name(domain.getUom_name());
         if(domain.getAvailable_thresholdDirtyFlag())
            model.setAvailable_threshold(domain.getAvailable_threshold());
         if(domain.getPurchase_line_warnDirtyFlag())
            model.setPurchase_line_warn(domain.getPurchase_line_warn());
         if(domain.getProduct_variant_countDirtyFlag())
            model.setProduct_variant_count(domain.getProduct_variant_count());
         if(domain.getPos_categ_idDirtyFlag())
            model.setPos_categ_id(domain.getPos_categ_id());
         if(domain.getCustom_messageDirtyFlag())
            model.setCustom_message(domain.getCustom_message());
         if(domain.getProperty_account_expense_idDirtyFlag())
            model.setProperty_account_expense_id(domain.getProperty_account_expense_id());
         if(domain.getSale_delayDirtyFlag())
            model.setSale_delay(domain.getSale_delay());
         if(domain.getUom_po_idDirtyFlag())
            model.setUom_po_id(domain.getUom_po_id());
         if(domain.getAvailable_in_posDirtyFlag())
            model.setAvailable_in_pos(domain.getAvailable_in_pos());
         if(domain.getCreate_uidDirtyFlag())
            model.setCreate_uid(domain.getCreate_uid());
         if(domain.getWrite_uidDirtyFlag())
            model.setWrite_uid(domain.getWrite_uid());
         if(domain.getProduct_tmpl_idDirtyFlag())
            model.setProduct_tmpl_id(domain.getProduct_tmpl_id());
        return model ;
    }

    public Product_product convert2Domain( Iproduct_product model ,Product_product domain) {
        if(model == null)
            return domain ;
        if(domain == null){
            domain = new Product_product();
        }

        if(model.getVariant_seller_idsDirtyFlag())
            domain.setVariant_seller_ids(model.getVariant_seller_ids());
        if(model.getProduct_template_attribute_value_idsDirtyFlag())
            domain.setProduct_template_attribute_value_ids(model.getProduct_template_attribute_value_ids());
        if(model.getProduct_variant_idsDirtyFlag())
            domain.setProduct_variant_ids(model.getProduct_variant_ids());
        if(model.getImage_smallDirtyFlag())
            domain.setImage_small(model.getImage_small());
        if(model.getMessage_unreadDirtyFlag())
            domain.setMessage_unread(model.getMessage_unread());
        if(model.getVolumeDirtyFlag())
            domain.setVolume(model.getVolume());
        if(model.getLst_priceDirtyFlag())
            domain.setLst_price(model.getLst_price());
        if(model.getValid_product_attribute_idsDirtyFlag())
            domain.setValid_product_attribute_ids(model.getValid_product_attribute_ids());
        if(model.getStock_fifo_manual_move_idsDirtyFlag())
            domain.setStock_fifo_manual_move_ids(model.getStock_fifo_manual_move_ids());
        if(model.getStock_quant_idsDirtyFlag())
            domain.setStock_quant_ids(model.getStock_quant_ids());
        if(model.getSupplier_taxes_idDirtyFlag())
            domain.setSupplier_taxes_id(model.getSupplier_taxes_id());
        if(model.getPricelist_item_idsDirtyFlag())
            domain.setPricelist_item_ids(model.getPricelist_item_ids());
        if(model.get__last_updateDirtyFlag())
            domain.set__last_update(model.get__last_update());
        if(model.getAccessory_product_idsDirtyFlag())
            domain.setAccessory_product_ids(model.getAccessory_product_ids());
        if(model.getSeller_idsDirtyFlag())
            domain.setSeller_ids(model.getSeller_ids());
        if(model.getValid_product_attribute_value_wnva_idsDirtyFlag())
            domain.setValid_product_attribute_value_wnva_ids(model.getValid_product_attribute_value_wnva_ids());
        if(model.getPartner_refDirtyFlag())
            domain.setPartner_ref(model.getPartner_ref());
        if(model.getProduct_image_idsDirtyFlag())
            domain.setProduct_image_ids(model.getProduct_image_ids());
        if(model.getMrp_product_qtyDirtyFlag())
            domain.setMrp_product_qty(model.getMrp_product_qty());
        if(model.getWrite_dateDirtyFlag())
            domain.setWrite_date(model.getWrite_date());
        if(model.getValid_product_template_attribute_line_idsDirtyFlag())
            domain.setValid_product_template_attribute_line_ids(model.getValid_product_template_attribute_line_ids());
        if(model.getActivity_type_idDirtyFlag())
            domain.setActivity_type_id(model.getActivity_type_id());
        if(model.getPublic_categ_idsDirtyFlag())
            domain.setPublic_categ_ids(model.getPublic_categ_ids());
        if(model.getEvent_ticket_idsDirtyFlag())
            domain.setEvent_ticket_ids(model.getEvent_ticket_ids());
        if(model.getPriceDirtyFlag())
            domain.setPrice(model.getPrice());
        if(model.getAttribute_line_idsDirtyFlag())
            domain.setAttribute_line_ids(model.getAttribute_line_ids());
        if(model.getVirtual_availableDirtyFlag())
            domain.setVirtual_available(model.getVirtual_available());
        if(model.getNbr_reordering_rulesDirtyFlag())
            domain.setNbr_reordering_rules(model.getNbr_reordering_rules());
        if(model.getActiveDirtyFlag())
            domain.setActive(model.getActive());
        if(model.getMessage_is_followerDirtyFlag())
            domain.setMessage_is_follower(model.getMessage_is_follower());
        if(model.getMessage_unread_counterDirtyFlag())
            domain.setMessage_unread_counter(model.getMessage_unread_counter());
        if(model.getIdDirtyFlag())
            domain.setId(model.getId());
        if(model.getWebsite_price_differenceDirtyFlag())
            domain.setWebsite_price_difference(model.getWebsite_price_difference());
        if(model.getMessage_follower_idsDirtyFlag())
            domain.setMessage_follower_ids(model.getMessage_follower_ids());
        if(model.getCart_qtyDirtyFlag())
            domain.setCart_qty(model.getCart_qty());
        if(model.getWebsite_public_priceDirtyFlag())
            domain.setWebsite_public_price(model.getWebsite_public_price());
        if(model.getRating_idsDirtyFlag())
            domain.setRating_ids(model.getRating_ids());
        if(model.getBom_line_idsDirtyFlag())
            domain.setBom_line_ids(model.getBom_line_ids());
        if(model.getWebsite_priceDirtyFlag())
            domain.setWebsite_price(model.getWebsite_price());
        if(model.getOutgoing_qtyDirtyFlag())
            domain.setOutgoing_qty(model.getOutgoing_qty());
        if(model.getSales_countDirtyFlag())
            domain.setSales_count(model.getSales_count());
        if(model.getValid_product_attribute_wnva_idsDirtyFlag())
            domain.setValid_product_attribute_wnva_ids(model.getValid_product_attribute_wnva_ids());
        if(model.getImage_mediumDirtyFlag())
            domain.setImage_medium(model.getImage_medium());
        if(model.getValid_existing_variant_idsDirtyFlag())
            domain.setValid_existing_variant_ids(model.getValid_existing_variant_ids());
        if(model.getStock_value_currency_idDirtyFlag())
            domain.setStock_value_currency_id(model.getStock_value_currency_id());
        if(model.getStock_valueDirtyFlag())
            domain.setStock_value(model.getStock_value());
        if(model.getWebsite_style_idsDirtyFlag())
            domain.setWebsite_style_ids(model.getWebsite_style_ids());
        if(model.getMessage_channel_idsDirtyFlag())
            domain.setMessage_channel_ids(model.getMessage_channel_ids());
        if(model.getWeightDirtyFlag())
            domain.setWeight(model.getWeight());
        if(model.getBom_idsDirtyFlag())
            domain.setBom_ids(model.getBom_ids());
        if(model.getMessage_has_error_counterDirtyFlag())
            domain.setMessage_has_error_counter(model.getMessage_has_error_counter());
        if(model.getActivity_stateDirtyFlag())
            domain.setActivity_state(model.getActivity_state());
        if(model.getValid_product_template_attribute_line_wnva_idsDirtyFlag())
            domain.setValid_product_template_attribute_line_wnva_ids(model.getValid_product_template_attribute_line_wnva_ids());
        if(model.getMessage_main_attachment_idDirtyFlag())
            domain.setMessage_main_attachment_id(model.getMessage_main_attachment_id());
        if(model.getMessage_partner_idsDirtyFlag())
            domain.setMessage_partner_ids(model.getMessage_partner_ids());
        if(model.getCreate_dateDirtyFlag())
            domain.setCreate_date(model.getCreate_date());
        if(model.getValid_product_attribute_value_idsDirtyFlag())
            domain.setValid_product_attribute_value_ids(model.getValid_product_attribute_value_ids());
        if(model.getQty_availableDirtyFlag())
            domain.setQty_available(model.getQty_available());
        if(model.getMessage_attachment_countDirtyFlag())
            domain.setMessage_attachment_count(model.getMessage_attachment_count());
        if(model.getImage_variantDirtyFlag())
            domain.setImage_variant(model.getImage_variant());
        if(model.getStock_move_idsDirtyFlag())
            domain.setStock_move_ids(model.getStock_move_ids());
        if(model.getMessage_needactionDirtyFlag())
            domain.setMessage_needaction(model.getMessage_needaction());
        if(model.getWebsite_message_idsDirtyFlag())
            domain.setWebsite_message_ids(model.getWebsite_message_ids());
        if(model.getStock_fifo_real_time_aml_idsDirtyFlag())
            domain.setStock_fifo_real_time_aml_ids(model.getStock_fifo_real_time_aml_ids());
        if(model.getActivity_date_deadlineDirtyFlag())
            domain.setActivity_date_deadline(model.getActivity_date_deadline());
        if(model.getCodeDirtyFlag())
            domain.setCode(model.getCode());
        if(model.getReordering_min_qtyDirtyFlag())
            domain.setReordering_min_qty(model.getReordering_min_qty());
        if(model.getImageDirtyFlag())
            domain.setImage(model.getImage());
        if(model.getRoute_idsDirtyFlag())
            domain.setRoute_ids(model.getRoute_ids());
        if(model.getTaxes_idDirtyFlag())
            domain.setTaxes_id(model.getTaxes_id());
        if(model.getBom_countDirtyFlag())
            domain.setBom_count(model.getBom_count());
        if(model.getMessage_needaction_counterDirtyFlag())
            domain.setMessage_needaction_counter(model.getMessage_needaction_counter());
        if(model.getPackaging_idsDirtyFlag())
            domain.setPackaging_ids(model.getPackaging_ids());
        if(model.getValid_archived_variant_idsDirtyFlag())
            domain.setValid_archived_variant_ids(model.getValid_archived_variant_ids());
        if(model.getActivity_user_idDirtyFlag())
            domain.setActivity_user_id(model.getActivity_user_id());
        if(model.getItem_idsDirtyFlag())
            domain.setItem_ids(model.getItem_ids());
        if(model.getPurchased_product_qtyDirtyFlag())
            domain.setPurchased_product_qty(model.getPurchased_product_qty());
        if(model.getReordering_max_qtyDirtyFlag())
            domain.setReordering_max_qty(model.getReordering_max_qty());
        if(model.getOrderpoint_idsDirtyFlag())
            domain.setOrderpoint_ids(model.getOrderpoint_ids());
        if(model.getOptional_product_idsDirtyFlag())
            domain.setOptional_product_ids(model.getOptional_product_ids());
        if(model.getIs_product_variantDirtyFlag())
            domain.setIs_product_variant(model.getIs_product_variant());
        if(model.getUsed_in_bom_countDirtyFlag())
            domain.setUsed_in_bom_count(model.getUsed_in_bom_count());
        if(model.getQty_at_dateDirtyFlag())
            domain.setQty_at_date(model.getQty_at_date());
        if(model.getMessage_has_errorDirtyFlag())
            domain.setMessage_has_error(model.getMessage_has_error());
        if(model.getActivity_idsDirtyFlag())
            domain.setActivity_ids(model.getActivity_ids());
        if(model.getMessage_idsDirtyFlag())
            domain.setMessage_ids(model.getMessage_ids());
        if(model.getBarcodeDirtyFlag())
            domain.setBarcode(model.getBarcode());
        if(model.getDisplay_nameDirtyFlag())
            domain.setDisplay_name(model.getDisplay_name());
        if(model.getStandard_priceDirtyFlag())
            domain.setStandard_price(model.getStandard_price());
        if(model.getAttribute_value_idsDirtyFlag())
            domain.setAttribute_value_ids(model.getAttribute_value_ids());
        if(model.getPrice_extraDirtyFlag())
            domain.setPrice_extra(model.getPrice_extra());
        if(model.getVariant_bom_idsDirtyFlag())
            domain.setVariant_bom_ids(model.getVariant_bom_ids());
        if(model.getAlternative_product_idsDirtyFlag())
            domain.setAlternative_product_ids(model.getAlternative_product_ids());
        if(model.getDefault_codeDirtyFlag())
            domain.setDefault_code(model.getDefault_code());
        if(model.getRoute_from_categ_idsDirtyFlag())
            domain.setRoute_from_categ_ids(model.getRoute_from_categ_ids());
        if(model.getActivity_summaryDirtyFlag())
            domain.setActivity_summary(model.getActivity_summary());
        if(model.getIncoming_qtyDirtyFlag())
            domain.setIncoming_qty(model.getIncoming_qty());
        if(model.getCurrency_idDirtyFlag())
            domain.setCurrency_id(model.getCurrency_id());
        if(model.getTrackingDirtyFlag())
            domain.setTracking(model.getTracking());
        if(model.getDescription_pickingDirtyFlag())
            domain.setDescription_picking(model.getDescription_picking());
        if(model.getProperty_stock_account_outputDirtyFlag())
            domain.setProperty_stock_account_output(model.getProperty_stock_account_output());
        if(model.getSale_okDirtyFlag())
            domain.setSale_ok(model.getSale_ok());
        if(model.getWebsite_descriptionDirtyFlag())
            domain.setWebsite_description(model.getWebsite_description());
        if(model.getWebsite_meta_og_imgDirtyFlag())
            domain.setWebsite_meta_og_img(model.getWebsite_meta_og_img());
        if(model.getCompany_idDirtyFlag())
            domain.setCompany_id(model.getCompany_id());
        if(model.getTo_weightDirtyFlag())
            domain.setTo_weight(model.getTo_weight());
        if(model.getDescriptionDirtyFlag())
            domain.setDescription(model.getDescription());
        if(model.getDescription_pickinginDirtyFlag())
            domain.setDescription_pickingin(model.getDescription_pickingin());
        if(model.getList_priceDirtyFlag())
            domain.setList_price(model.getList_price());
        if(model.getHide_expense_policyDirtyFlag())
            domain.setHide_expense_policy(model.getHide_expense_policy());
        if(model.getDescription_saleDirtyFlag())
            domain.setDescription_sale(model.getDescription_sale());
        if(model.getCost_methodDirtyFlag())
            domain.setCost_method(model.getCost_method());
        if(model.getSequenceDirtyFlag())
            domain.setSequence(model.getSequence());
        if(model.getSale_line_warn_msgDirtyFlag())
            domain.setSale_line_warn_msg(model.getSale_line_warn_msg());
        if(model.getWarehouse_idDirtyFlag())
            domain.setWarehouse_id(model.getWarehouse_id());
        if(model.getRentalDirtyFlag())
            domain.setRental(model.getRental());
        if(model.getProperty_account_creditor_price_differenceDirtyFlag())
            domain.setProperty_account_creditor_price_difference(model.getProperty_account_creditor_price_difference());
        if(model.getWeight_uom_nameDirtyFlag())
            domain.setWeight_uom_name(model.getWeight_uom_name());
        if(model.getCost_currency_idDirtyFlag())
            domain.setCost_currency_id(model.getCost_currency_id());
        if(model.getProperty_stock_account_inputDirtyFlag())
            domain.setProperty_stock_account_input(model.getProperty_stock_account_input());
        if(model.getNameDirtyFlag())
            domain.setName(model.getName());
        if(model.getProduce_delayDirtyFlag())
            domain.setProduce_delay(model.getProduce_delay());
        if(model.getIs_seo_optimizedDirtyFlag())
            domain.setIs_seo_optimized(model.getIs_seo_optimized());
        if(model.getWebsite_urlDirtyFlag())
            domain.setWebsite_url(model.getWebsite_url());
        if(model.getRating_last_feedbackDirtyFlag())
            domain.setRating_last_feedback(model.getRating_last_feedback());
        if(model.getWebsite_size_yDirtyFlag())
            domain.setWebsite_size_y(model.getWebsite_size_y());
        if(model.getEvent_okDirtyFlag())
            domain.setEvent_ok(model.getEvent_ok());
        if(model.getInventory_availabilityDirtyFlag())
            domain.setInventory_availability(model.getInventory_availability());
        if(model.getPurchase_okDirtyFlag())
            domain.setPurchase_ok(model.getPurchase_ok());
        if(model.getCreate_uid_textDirtyFlag())
            domain.setCreate_uid_text(model.getCreate_uid_text());
        if(model.getRating_last_valueDirtyFlag())
            domain.setRating_last_value(model.getRating_last_value());
        if(model.getWebsite_meta_titleDirtyFlag())
            domain.setWebsite_meta_title(model.getWebsite_meta_title());
        if(model.getRating_last_imageDirtyFlag())
            domain.setRating_last_image(model.getRating_last_image());
        if(model.getDescription_purchaseDirtyFlag())
            domain.setDescription_purchase(model.getDescription_purchase());
        if(model.getWebsite_idDirtyFlag())
            domain.setWebsite_id(model.getWebsite_id());
        if(model.getCan_be_expensedDirtyFlag())
            domain.setCan_be_expensed(model.getCan_be_expensed());
        if(model.getSale_line_warnDirtyFlag())
            domain.setSale_line_warn(model.getSale_line_warn());
        if(model.getWebsite_size_xDirtyFlag())
            domain.setWebsite_size_x(model.getWebsite_size_x());
        if(model.getService_to_purchaseDirtyFlag())
            domain.setService_to_purchase(model.getService_to_purchase());
        if(model.getWebsite_sequenceDirtyFlag())
            domain.setWebsite_sequence(model.getWebsite_sequence());
        if(model.getProperty_stock_inventoryDirtyFlag())
            domain.setProperty_stock_inventory(model.getProperty_stock_inventory());
        if(model.getLocation_idDirtyFlag())
            domain.setLocation_id(model.getLocation_id());
        if(model.getProperty_valuationDirtyFlag())
            domain.setProperty_valuation(model.getProperty_valuation());
        if(model.getIs_publishedDirtyFlag())
            domain.setIs_published(model.getIs_published());
        if(model.getExpense_policyDirtyFlag())
            domain.setExpense_policy(model.getExpense_policy());
        if(model.getWeight_uom_idDirtyFlag())
            domain.setWeight_uom_id(model.getWeight_uom_id());
        if(model.getColorDirtyFlag())
            domain.setColor(model.getColor());
        if(model.getProperty_stock_productionDirtyFlag())
            domain.setProperty_stock_production(model.getProperty_stock_production());
        if(model.getWebsite_publishedDirtyFlag())
            domain.setWebsite_published(model.getWebsite_published());
        if(model.getWebsite_meta_keywordsDirtyFlag())
            domain.setWebsite_meta_keywords(model.getWebsite_meta_keywords());
        if(model.getDescription_pickingoutDirtyFlag())
            domain.setDescription_pickingout(model.getDescription_pickingout());
        if(model.getPricelist_idDirtyFlag())
            domain.setPricelist_id(model.getPricelist_id());
        if(model.getRating_countDirtyFlag())
            domain.setRating_count(model.getRating_count());
        if(model.getWebsite_meta_descriptionDirtyFlag())
            domain.setWebsite_meta_description(model.getWebsite_meta_description());
        if(model.getValuationDirtyFlag())
            domain.setValuation(model.getValuation());
        if(model.getInvoice_policyDirtyFlag())
            domain.setInvoice_policy(model.getInvoice_policy());
        if(model.getPurchase_line_warn_msgDirtyFlag())
            domain.setPurchase_line_warn_msg(model.getPurchase_line_warn_msg());
        if(model.getWrite_uid_textDirtyFlag())
            domain.setWrite_uid_text(model.getWrite_uid_text());
        if(model.getProperty_account_income_idDirtyFlag())
            domain.setProperty_account_income_id(model.getProperty_account_income_id());
        if(model.getProperty_cost_methodDirtyFlag())
            domain.setProperty_cost_method(model.getProperty_cost_method());
        if(model.getCateg_idDirtyFlag())
            domain.setCateg_id(model.getCateg_id());
        if(model.getIsPartsDirtyFlag())
            domain.setIsParts(model.getIsParts());
        if(model.getUom_idDirtyFlag())
            domain.setUom_id(model.getUom_id());
        if(model.getProduct_variant_idDirtyFlag())
            domain.setProduct_variant_id(model.getProduct_variant_id());
        if(model.getTypeDirtyFlag())
            domain.setType(model.getType());
        if(model.getPurchase_methodDirtyFlag())
            domain.setPurchase_method(model.getPurchase_method());
        if(model.getResponsible_idDirtyFlag())
            domain.setResponsible_id(model.getResponsible_id());
        if(model.getService_typeDirtyFlag())
            domain.setService_type(model.getService_type());
        if(model.getUom_nameDirtyFlag())
            domain.setUom_name(model.getUom_name());
        if(model.getAvailable_thresholdDirtyFlag())
            domain.setAvailable_threshold(model.getAvailable_threshold());
        if(model.getPurchase_line_warnDirtyFlag())
            domain.setPurchase_line_warn(model.getPurchase_line_warn());
        if(model.getProduct_variant_countDirtyFlag())
            domain.setProduct_variant_count(model.getProduct_variant_count());
        if(model.getPos_categ_idDirtyFlag())
            domain.setPos_categ_id(model.getPos_categ_id());
        if(model.getCustom_messageDirtyFlag())
            domain.setCustom_message(model.getCustom_message());
        if(model.getProperty_account_expense_idDirtyFlag())
            domain.setProperty_account_expense_id(model.getProperty_account_expense_id());
        if(model.getSale_delayDirtyFlag())
            domain.setSale_delay(model.getSale_delay());
        if(model.getUom_po_idDirtyFlag())
            domain.setUom_po_id(model.getUom_po_id());
        if(model.getAvailable_in_posDirtyFlag())
            domain.setAvailable_in_pos(model.getAvailable_in_pos());
        if(model.getCreate_uidDirtyFlag())
            domain.setCreate_uid(model.getCreate_uid());
        if(model.getWrite_uidDirtyFlag())
            domain.setWrite_uid(model.getWrite_uid());
        if(model.getProduct_tmpl_idDirtyFlag())
            domain.setProduct_tmpl_id(model.getProduct_tmpl_id());
        return domain ;
    }


}
